﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace SilverPop.UI.Controls
{
	public class Divide2Converter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			double v = System.Convert.ToDouble(value);
			return v / 2;

		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			double v = System.Convert.ToDouble(value);
			return v * 2;
		}
	}
}
